﻿@model Angel.Web.Models.FilterModel
@using Angel.Entities;

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
}
<head>
    <script src="../../Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script>
    <link href="../../Content/themes/viewUser.css" rel="stylesheet" type="text/css" />
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
     <link href="../../Content/themes/viewUser.css" rel="stylesheet" type="text/css" />
</head>
<body>
     <section id="content" role="main">
         <h1 id="admin-page-heading">Users</h1>     
         <div class="content-#">
			<nav class="aui-toolbar">
				<div class="toolbar-split toolbar-split-right">
					<ul class="toolbar-group">				
						<li class="toolbar-item">	
							<div id="invite_user">@Html.ActionLink("Invite Users", "Invite", "User")</div>
						</li>
						<li class="toolbar-item">
							<div id="create_user">@Html.ActionLink("Create User", "Add", "User")</div>
						</li>
					</ul>
				</div>
               
                <div class="form-body">
	                <h2>Filter Users </h2>	
    				
                    @using (Ajax.BeginForm("Index_Filter", new AjaxOptions { UpdateTargetId = "listUser" }))
                    {
                        <div class = "username">
                             User Name Contains<br />
                            @Html.TextBoxFor(ab => ab.userNameContain, new { style = "width:90%" })
                        </div>
    
                        <div class="fullname">
                             Full Name Contains<br />
                             @Html.TextBoxFor(ab => ab.fullNameContain, new { style = "width:90%" })
                        </div>
    
                        <div class="email">
                            Email Contains<br />
                            @Html.TextBoxFor(ab => ab.emailContain, new { style = "width:90%" })             
                        </div>
    
                        <div class="groupName">
                             In Group<br />
                             @Html.DropDownListFor(ab => ab.groupId, (SelectList)ViewBag.Groups, new { style = "width:90%" })
                        </div>
                        <div class = "field">
                             Users Per Page<br />
                             <select class="full-width">
									                    <option value="10">All</option>
									                    <option value="20">10</option>
									                    <option value="25">20</option>
									                    <option value="1">50</option>
		                    </select>
                        </div>
    
                        <div class="btSubmit">
                             <input type="submit" value="Filter" id="bt"/>
		                     @Ajax.ActionLink("Reset Filter", "Index_Filter", new AjaxOptions { UpdateTargetId = "listUser" })
                        </div> 
                        

                    }       
                </div> 
                <div class="form-content">
			        <div id = "listUser">
                        @{Html.RenderPartial("Filtered", Model.list);}
                    </div>
			    </div>
         </div>   
    </section>
   
 </body>